package com.fy.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@AllArgsConstructor
@ToString
public enum ErrorType {
    //成功
    SUCCESS                                     ("200","success"),
    //系统错误
    SYSTEM_ERROR                                ("500","error.system"),
    //参数不正确
    ILLEGAL_PARAMETERS                          ("400","illegal.parameters"),
    //session 失效
    USER_NOT_LOGIN                              ("401","user.not.login"),

    //文件超出长度
    UPLOAD_FILE_SIZE_EXCEEDED_ERROR             ("50000","user.not.find"),
    //密码错误
    PASSWORD_ERROR                              ("50001","password.error"),
    //未找到用户
    USER_NOT_FIND                               ("50002","user.not.find"),

    //
    ARGUMENT_NOT_VALID                          ("#9999999",""),

    ;

    /**
     * 异常code,返回给前端
     */
    private String errorCode;
    /**
     * 异常key,用作国际化
     */
    private String errorKey;



    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorKey() {
        return errorKey;
    }

    public void setErrorKey(String errorKey) {
        this.errorKey = errorKey;
    }
}
